Description of project: For our Operations Research course, our team completed a portfolio optimization project focused on applying an extension to the Markowitz Mean–Variance model to real stock market data. We selected a set of major technology and consumer stocks and used historical price data to calculate expected returns, variances, and covariances. Using these values, we built an optimization model that identifies the portfolio with the lowest possible risk while still meeting a required rate of return. We also generated multiple visualizations, including efficient frontier plots, risk–return scatter diagrams, and weight distribution charts to help interpret the results. These tools allowed us to observe how different combinations of stocks affect overall portfolio risk and performance.
Description of data set: The data set we selected contains detailed historical financial information for several publicly traded companies. It includes daily stock prices, calculated daily returns, average returns, standard deviations, and covariance values for each pair of stocks. Additional financial indicators, such as market volatility, company sector, and broader economic trends, were also considered when interpreting the optimization results. This dataset allowed us to explore relationships between risk, expected return, and diversification, and to evaluate how combining different assets affects the stability and performance of an investment portfolio.
Project Summary & Skills Used
This project applied the Markowitz mean-variance framework to construct optimal investment portfolios using historical stock market data. We collected and cleaned price data, calculated daily returns, and used optimization techniques to balance the tradeoff between expected return and portfolio risk.
The project aligns with Industrial Engineering concepts such as resource allocation, mathematical optimization, and decision-making under uncertainty.
Skills Demonstrated:
- Data cleaning and preprocessing
- Calculating returns and covariance matrices
- Implementing mathematical optimization in R
- Visualizing risk/return relationships
- Understanding financial modeling concepts
Project Development Process
Original Idea
The initial goal was to determine the best stock allocation using real historical data. As the project progressed, the scope broadened to include multiple portfolio optimization strategies and visualization of the efficient frontier.
Evolution of the Project
We moved from raw price data → returns → covariance matrix → optimization model → risk/return graphs.
We also added constraints such as: - No short selling (weights ≥ 0)
- Full investment (weights sum to 1)
- Optional weight caps
Challenges Encountered
- Handling NA values in return calculations
- Ensuring the covariance matrix was valid
- Solver errors when constraints were misdefined
- Debugging plotting issues with the efficient frontier
Final System
The final implementation includes: - Minimum-variance portfolio
- Maximum-return portfolio
- Tangency (maximum Sharpe ratio) portfolio
- Efficient frontier visualization

Key Features and Highlights
1. Markowitz Optimization Model
We implemented the classical model:
- Objective: Minimize portfolio variance or maximize return
- Decision Variables: Asset weights
- Constraints:
- Sum(weights) = 1
- All weights ≥ 0
- Optional: individual weight limits
- Sum(weights) = 1
This model forms the foundation of modern portfolio theory.

2. Data Preparation Pipeline
Raw historical prices were transformed into: - Daily returns
- Expected return vector
- Covariance matrix

This pipeline reflects real practices in quantitative finance.
Reflection
Through this project, I gained experience in optimization modeling, financial analysis, and debugging ampl. My contributions included preparing the dataset, computing the covariance matrix, helping formulate the optimization model, and creating the visual outputs.
I grew more confident in: - Building mathematical models
- Handling real-world financial datasets
- Using R for analysis and visualization
- Understanding risk tradeoffs in investment decisions
This project demonstrated how Industrial Engineering and Operations Research techniques apply directly to financial decision-making.